<?php 
	echo $this->element('reportcss');
	$file_name = "科技项目资助情况统计表";
	if(empty($report)){?>
<div class="right_side_operate_area">
	<div class="right_side_title left">
		<h2><?php echo $file_name;?></h2>
	</div>
    <?php
    $url_explode=explode("group=", $_SERVER["QUERY_STRING"]);
    	echo '<div class="right back_btn">';
		echo $html->link("导出报表","/reports/technologyreport/1?group=".$url_explode[1]);
		echo '</div>';
	?> 
	<?php echo $this->element('reportgroup'); ?>
	<div class="clear"></div>
</div>
<div class="right_side_scollbar">
    <div class="detail_info_panel">
        <div class="items_list">
<?php }?>
			<?php 
        		if(!empty($report)){
        			echo "<div align='center'><h3>$file_name</h3></div>";
        		}
        	?>
        	<table border='1'>
            	<tr>
            		<th class="th">序号</th>
                    <th class="th" >项目级别</th>
		 			<th class="th">项目名称</th>
		 			<th class="th" >承担单位</th>
		 			<th class="th" >模块</th>
		 			<th class="th" >立项时间</th>
		 			<th class="th">项目经费（万元）</th>
                </tr>
                <?php 
                	$i=1;
			 		foreach($ind_comps as  $ind_comp)
			 		{  
			 			$ind=$ind_comp[0];
			 			$strname=$ind["name"];
			 			$level=$ind["level"];
			 			$project_time=$ind_comp["comp_otherdeclares"]["project_time"];
			 			$project_times=$str->formatCell($project_time);
			 			$company_name=$ind_comp["companies"]["company_name"];
			 			$groupname = $grouplist[$ind_comp["companies"]["groupid"]];
			 			
			 			if($strname=="合计"&&$level!="总计"){
			 				$i=0;
			 				$level="";
			 				$strname="";
			 				$groupname="";
			 				$project_times="合计";
			 				$company_name="";
			 			}
			 			if($level=="总计"){
			 				$i=0;
			 				$level="";
			 				$strname="";
			 				$groupname = "";
			 				$project_times="总计";
			 				$company_name="";
			 			}
		 				echo "<tr>";
		 				if($i==0){echo "<td>".""."</td>";}
		 				else{echo "<td align='center'>".$i."</td>";}
		 			    echo "<td align='center'>".$level."</td>";
		 			    echo "<td align='center'>".$strname."</td>";
		 			    echo "<td align='center'>".$company_name."</td>";
		 			    echo "<td align='center'>".$groupname."</td>";
		 			    echo "<td align='center'>".$project_times."</td>";
		 			    echo "<td align='center'>".$ind["fund"]."</td>";
						echo "</tr>";
						$i++;
			 		}
                ?>
            </table>
<?php if(empty($report)){?>
		</div>
    </div>
</div>
<?php }?>